var sites = {
    site1: "Runoob",
    site2: "Google"
};
// 访问对象的值
console.log(sites.site1);
console.log(sites.site2);
var sites1 = {
    site1: "Runoob",
    site2: "Google",
    sayHello: function () { } // 类型模板
};
sites1.sayHello = function () {
    console.log("hello " + sites1.site1);
};
sites1.sayHello();
//此外对象也可以作为一个参数传递给函数，如下实例：
var sites = {
    site1: "Runoob",
    site2: "Google"
};
var invokesites = function (obj) {
    console.log("site1 :" + obj.site1);
    console.log("site2 :" + obj.site2);
};
invokesites(sites);
